fix keycloak missing resource error check#69028
Conversation
72a2abf to
ebc208e
Compare
84b07f0 to
24b997b
Compare
|
Tagging @onlyarnav here, you are modifying the constant |
|
@vincbeck Updating the constant should be fine as its only used with this function |
|
@vincbeck @onlyarnav I've updated the PR to check against the |
|
You really seem to override what @onlyarnav did, I'd like him to review it |
|
Thanks for the update! I just had a look at it. My PR handled the error based on the original issue, where the response appeared to be a plain text string ( From what you've shared, checking the structured JSON response via My only question is whether the original plain-text |
7af4a2a to
474b647
Compare
|
hey @onlyarnav sorry for the confusion, I made a mistake in my original github issue. The error is as listed in this PR. Additionally the response from keycloak is a 400 which gets converted into a 500 by the Airflow webserver. I've updated the PR to reflect this. see https://stackoverflow.com/questions/68417386/invalid-resource-or-resourceid-does-not-exist-keycloak |
e64d9c1 to
393bb00
Compare
393bb00 to
46b767d
Compare
onlyarnav
left a comment
There was a problem hiding this comment.
Seems good to me. Thanks for the clarification regarding the error code.
The error raised by keycloak that should be handled is `{"error":"invalid_resource", "error_description": "Resource with id [Dag:team-a] does not exist."}`. This returns a 400 client error which is then converted into a 500 error by Airflow.
Fix Auth manager check for keycloak 'resource not found' error
The error raised by keycloak that should be handled is
{"error":"invalid_resource", "error_description": "Resource with id [Dag:team-a] does not exist."}This returns a 400 client error which is then converted into a 500 error by Airflow.Sample log:
related: #68943
related: #68951
Was generative AI tooling used to co-author this PR?